﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Text;

namespace T.FAS.Runtime.Base.Entity
{
    [Serializable]
    public class ListTRecord
    {
        public List<TRecord> DataResult = new List<TRecord>();

        public int CurrentRowNumber { get; set; }
        public int Rows { get; set; }

        [JsonIgnore]
        public dynamic Current
        {
            get
            {
                return DataResult[CurrentRowNumber];
            }
        }
        public void Add(TRecord record)
        {
            if (DataResult == null)
                DataResult = new List<TRecord>();
            DataResult.Add(record);
        }
    }
}

